package com.itheima.controller;


import com.itheima.pojo.EmpResult;
import com.itheima.pojo.OperateLog;
import com.itheima.pojo.Result;
import com.itheima.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@Component
public class LogController {

    @Autowired
    private LogService logService;

    // 日志分页查询
    @GetMapping("/log/page")
    public Result logPage(Integer page, Integer pageSize) {
        log.info("查询日志列表");
        return Result.success(logService.page(page, pageSize));
    }
}
